package com.cs.study.homework._0301;

public class Demo2 {
    public static void main(String[] args) {
        try {
            func();
            System.out.println(10/0);
        } catch (ArithmeticException e){
            System.out.println("除数不能为0");
        }
    }

    private static void func() throws RuntimeException{
        int a = 1;
        int b = 0;
        System.out.println(a/b);
    }
}
